<?php
/**
 * Created by PhpStorm.
 * User: Bzing
 * Date: 2017/7/25
 * Time: 12:34
 */
namespace app\crontab\controller;
use app\models\Models;
use think\Controller;
use think\Db;

class Month extends Controller {
    /**
     * 定时清空销售月销售金额
     * 每月1号0点执行计划任务
     * @return string
     */
    public function autoEmptySales(){
        $sql = 'update it_account set sales_month = 0';
        $bool = Db::execute($sql);
        if(false === $bool){
            return 'error';
        } else{
            return 'success';
        }
    }
}